/*
 * @Auther: Ye Chen
 * @Date: 2020-07-30 16:13:52
 * @LastEditors: Ye Chen
 * @LastEditTime: 2020-07-30 16:36:26
 * @Description:
 */
import { axios } from '@/api/request'

// 添加回收人员
export function createUser(data) {
  return axios({
    url: '/account/addRecUser',
    method: 'POST',
    data
  })
}

// 拒绝申请
export function rejectApply(data) {
  return axios({
    url: '/account/fail',
    method: 'PUT',
    data
  })
}

// 同意申请
export function resolveApply(data) {
  return axios({
    url: '/account/success',
    methodL: 'PUT',
    data
  })
}

// 回收人员申请列表
export function queryAccountList(params) {
  return axios({
    url: '/account/apply',
    method: 'GET',
    params
  })
}

// 回收人员列表查询
export function queryRecycleList(params) {
  return axios({
    url: '/account/list',
    method: 'GET',
    params
  })
}
// 回收人员列表查询
export function deleteRecycle(data) {
  return axios({
    url: '/account/list',
    method: 'DELETE',
    data
  })
}
// 编辑人员
export function updateRecycle(data) {
  return axios({
    url: '/account/list',
    method: 'PUT',
    data
  })
}
// 添加人员
export function createRecycle(data) {
  return axios({
    url: '/account/register',
    method: 'POST',
    data
  })
}

// 启用账号
export function enabledAccount(data) {
  return axios({
    url: '/account/applyThaw',
    method: 'PUT',
    data
  })
}

// 禁用账户
export function disableedAccount(data) {
  return axios({
    url: '/account/applyBan',
    method: 'PUT',
    data
  })
}

// 查询回收人员账号信息
export function queryUserDetails(params) {
  return axios({
    url: '/account/detail',
    method: 'GET',
    params
  })
}
